﻿using System;
using System.Web.UI;



namespace mojoPortal.Web.RS.SBM
{
    public partial class RSManageProduct : RSBasePage
    {
        private int _companyid = 0;
        private int _productid = 0;

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
        }

        protected void btnAddProduct_Click(Object sender, EventArgs e)
        {

        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string header = "";
                bool isequipment = false;
                if (Request.QueryString["cat"] == "equip")
                {
                    header = "Equipment Inventory";
                    isequipment = true;
                }
                if (Request.QueryString["cat"] == "part")
                {
                    header = "Parts Inventory";
                }
                InitializeReadyServicePage(header);
                RSUserIdentity userIdentity = GetRSUserIdentity();
                _companyid = userIdentity.RSCompanyId;

                if (!String.IsNullOrEmpty(Request.QueryString["productid"]))
                    _productid = Convert.ToInt32(Request.QueryString["productid"].ToString());

                if (_companyid > 0 && _productid > 0)
                {
                    bool bhasdata = ucProductControl.LoadProductDataByID(_companyid, _productid, isequipment);
                }
            }
        }
    }
}


